
import request from '@/utils/request'

/**
 * 查询客户端版本列表
 * @param {object} options 
 * @param {number} page
 * @param {number} row
 * @param {boolean} client  
 * @param {string} phoneSystem (android / ios)
 */
export function getAppVersionList(options){
  
    return request({
      url: 'mg/AppData/GetAppVersionList',
      method: 'get',
      params: options
    })
}


/**
 * 新增客户端版本
 * @param {*} data {phoneSystem,appVersion,serviceVersion,isNeed,updateContent,url,client}
 * 
 */
export function addNewVersion(data){
  
    return request({
      url: 'mg/AppData/AddAppVersion',
      method: 'get',
      params:data
    })
}

/**
 * 删除客户端版本
 * @param {*} options {id}
 * 
 */
export function deleteAppVersion(options){
  
    return request({
      url: 'mg/AppData/DeleteAppVersion',
      method: 'get',
      params:options
    })
}

/**
 * 获取最新客户端版本的信息
 * @param {*} options  
 * 
 */
export function getNewAppVersionInfo(options){
  
    return request({
      url: 'mg/AppData/GetNewAppVersionInfo',
      method: 'get',
      params:options
    })
}


/**
 * 查询Banner图片列表
 * @param {object} options 
 * @param {number} page
 * @param {number} row
 * @param {number} type  
 * @param {string} name  
 */
export function getAppBannerList(options){
  
    return request({
      url: 'mg/AppData/GetAppBannerList',
      method: 'get',
      params: options
    })
}

/**
 * 新增Banner图片
 * @param {*} data {type,img,name,sort}
 * 
 */
export function addNewBanner(data){
  
    return request({
      url: 'mg/AppData/AddAppBanner',
      method: 'get',
      params:data
    })
}


/**
 * 删除Banner图片
 * @param {*} data {id}
 * 
 */
export function deleteBanner(data){
  
    return request({
      url: 'mg/AppData/DeleteAppBanner',
      method: 'get',
      params:data
    })
}
